package com.example.demo.mapper;


import com.example.demo.entity.teacherLogin;
import com.example.demo.entity.userLogin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface userLoginMapper {
    public List<userLogin> selectall();

    public Integer inseruserLogin(@Param("id")String id,@Param("name")String name,@Param("loginuser")String loginuser,@Param("password")String password);

    //接收控制层返回的用户名，然后对应数据表有这个id和这个用户名，密码也一样的话就返回对应信息
    public userLogin selectPassword(@Param("LoginName")String name,@Param("password")String password);

    //老师登录
    teacherLogin selectTeacher(@Param("id")Integer id,@Param("name")String name);

    //修改用户姓名
    Integer updateLogin(@Param("name")String name,@Param("id")String id);

    Integer updatePassword(@Param("userId")String userId,@Param("password")String password);


}
